import request from '@/utils/request'

// 查询趣闻列表
export function listFun(query) {
  return request({
    url: '/system/fun/list',
    method: 'get',
    params: query
  })
}

// 查询趣闻详细
export function getFun(id) {
  return request({
    url: '/system/fun/' + id,
    method: 'get'
  })
}

// 新增趣闻
export function addFun(data) {
  return request({
    url: '/system/fun',
    method: 'post',
    data: data
  })
}

// 修改趣闻
export function updateFun(data) {
  return request({
    url: '/system/fun',
    method: 'put',
    data: data
  })
}

// 删除趣闻
export function delFun(id) {
  return request({
    url: '/system/fun/' + id,
    method: 'delete'
  })
}
